package com.dqhl.business.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.dqhl.business.Base.BaseActivity;
import com.dqhl.business.R;

/**
 * description: 促销设置
 * autour: guanluocang
 * date: 2016/11/8 17:21
 */
public class PromotionSettingActivity extends BaseActivity implements View.OnClickListener {

    private ImageView iv_goodsGoBack;
    private TextView tv_goodsTopTitle;
    private ImageView iv_promotion_single;
    private ImageView iv_promotion_all;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_promotion_setting);
        initView();
    }

    private void initView() {
        iv_goodsGoBack = (ImageView) findViewById(R.id.iv_goodsGoBack);
        tv_goodsTopTitle = (TextView) findViewById(R.id.tv_goodsTopTitle);
        iv_promotion_single = (ImageView) findViewById(R.id.iv_promotion_single);
        iv_promotion_all = (ImageView) findViewById(R.id.iv_promotion_all);

        iv_promotion_all.setOnClickListener(this);
        iv_promotion_single.setOnClickListener(this);
        tv_goodsTopTitle.setText("促销设置");
        iv_goodsGoBack.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            //整单促销
            case R.id.iv_promotion_all:
                overlay(PromotionAllRecordActivity.class);
                break;
            //单品促销
            case R.id.iv_promotion_single:
                overlay(PromotionSingleRecordActivity.class);
                break;
            case R.id.iv_goodsGoBack:
                finish();
                break;
        }
    }
}
